﻿' Copyright (c) 2013  Christoc.com
'  All rights reserved.
' 
' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
' DEALINGS IN THE SOFTWARE.
' 

Imports DotNetNuke.Entities.Modules
Imports DotNetNuke.ComponentModel.DataAnnotations
Imports System.Web.Caching
Imports System

Namespace Components

    'setup the primary key for table
    'configure caching using PetaPoco
    'scope the objects to the ModuleId of a module on a page (or copy of a module on a page)
    <TableName("MVPcsIframe_Items")> _
    <PrimaryKey("ItemId", AutoIncrement:=True)> _
    <Cacheable("Items", CacheItemPriority.Default, 20)> _
    <Scope("ModuleId")>
    Public Class Item



        Private _itemId As Integer
        Private _itemName As String
        Private _itemDescription As String
        Private _itemURL As String
        Private _Key1 As String
        Private _Key2 As String
        Private _Key3 As String
        Private _Value1 As String
        Private _Value2 As String
        Private _Value3 As String
        Private _createdByUserId As Integer
        Private _lastModifiedByUserId As Integer
        Private _createdOnDate As DateTime
        Private _lastModifiedOnDate As DateTime
        Private _moduleId As Integer
        Private _tabId As Integer

        Public Property ItemId() As Integer
            Get
                Return _itemId
            End Get
            Set(ByVal value As Integer)
                _itemId = value
            End Set
        End Property


        Public Property ItemName() As String
            Get
                Return _itemName
            End Get
            Set(ByVal value As String)
                _itemName = value
            End Set
        End Property

        Public Property ItemDescription() As String
            Get
                Return _itemDescription
            End Get
            Set(ByVal value As String)
                _itemDescription = value
            End Set
        End Property

        Public Overloads Property ItemURL() As String
            Get
                Return _itemURL
            End Get
            Set(ByVal value As String)
                _itemURL = value
            End Set
        End Property

        Public Overloads Property Key1() As String
            Get
                Return _Key1
            End Get
            Set(ByVal value As String)
                _Key1 = value
            End Set
        End Property

        Public Overloads Property Key2() As String
            Get
                Return _Key2
            End Get
            Set(ByVal value As String)
                _Key2 = value
            End Set
        End Property

        Public Overloads Property Key3() As String
            Get
                Return _Key3
            End Get
            Set(ByVal value As String)
                _Key3 = value
            End Set
        End Property

        Public Overloads Property Value1() As String
            Get
                Return _Value1
            End Get
            Set(ByVal value As String)
                _Value1 = value
            End Set
        End Property

        Public Overloads Property Value2() As String
            Get
                Return _Value2
            End Get
            Set(ByVal value As String)
                _Value2 = value
            End Set
        End Property

        Public Overloads Property Value3() As String
            Get
                Return _Value3
            End Get
            Set(ByVal value As String)
                _Value3 = value
            End Set
        End Property

        Public Overloads Property CreatedByUserId() As Integer
            Get
                Return _createdByUserId
            End Get
            Set(ByVal value As Integer)
                _createdByUserId = value
            End Set
        End Property

        Public Overloads Property LastModifiedByUserId() As Integer
            Get
                Return _lastModifiedByUserId
            End Get
            Set(ByVal value As Integer)
                _lastModifiedByUserId = value
            End Set
        End Property

        Public Overloads Property CreatedOnDate() As DateTime
            Get
                Return _createdOnDate
            End Get
            Set(ByVal value As DateTime)
                _createdOnDate = value
            End Set
        End Property

        Public Overloads Property LastModifiedOnDate() As DateTime
            Get
                Return _lastModifiedOnDate
            End Get
            Set(ByVal value As DateTime)
                _lastModifiedOnDate = value
            End Set
        End Property

        Public Overloads Property TabId() As Integer
            Get
                Return _tabId
            End Get
            Set(value As Integer)
                _tabId = value
            End Set
        End Property

        Public Overloads Property ModuleId() As Integer
            Get
                Return _moduleId
            End Get
            Set(ByVal value As Integer)
                _moduleId = value
            End Set
        End Property

    End Class

End Namespace